package org.absolutezero.model;

import java.util.HashMap;
import java.util.Map;

import org.apache.log4j.Logger;



public class Session {
	private static Map<String, Object> cache = new HashMap<String, Object>();
	private static Logger logger = Logger.getLogger(Session.class.getName());
	
	public static void put(String key, Object val){
		cache.put(key, val);
		logger.info(String.format("Session put: %s - %s", key, val.toString()));
	}
	
	public static Object get(String key){
		logger.info(String.format("Session get: %s", key));
		return cache.get(key);
	}
	
	public static void clear(){
		logger.info("Session clear");
		cache.clear();
	}
}
